<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>判断测试者体重为标准体重还是超重还是偏瘦</title>
</head>
<body>
    <script>
        var h = prompt('请输入您的身高'), w = prompt('请输入您的体重'), r = (h - 108) * 2;
        if (w > (r + 10)) {
            alert(r+'您超重了')
        }else if (w < (r - 10)) {
            alert(r+'您偏瘦')
        } else {
            alert(r+'标准身材')
        }
    </script>
</body>
</html>